//
//  Music_YDSlider.h
//  LEXY
//
//  Created by TKingLee on 14-9-7.
//  Copyright (c) 2014年 xyx. All rights reserved.
//

#import "YDSlider.h"
#import <AVFoundation/AVFoundation.h>

@protocol LineProgressViewDelegate <NSObject>

@optional

- (void)updateProgressViewWithPlayer:(AVAudioPlayer *)player;
- (void)playerDidFinishPlaying;
- (void)btnStateChange:(BOOL)isOn;

@end

@interface Music_YDSlider : YDSlider < AVAudioPlayerDelegate>

@property (copy, nonatomic) NSString *audioPath;
@property (assign, nonatomic) CGFloat lineWidth;
@property (assign, nonatomic) NSTimeInterval duration;
@property (assign, nonatomic) BOOL playOrPauseButtonIsPlaying;
@property (strong, nonatomic) id <LineProgressViewDelegate> delegate;


@property (nonatomic) NSTimer *timer;
@property (nonatomic) AVAudioPlayer *player;//an AVAudioPlayer instance
@property (assign, nonatomic) float progress;


- (void)play;
- (void)pause;
- (void)stop;

@end
